home *** CD-ROM | disk | FTP | other *** search
/ Hottest 6 / Hottest 6 (1996)(PDSoft)[!].iso / software / videoutils / h-m / isl14 / isl.doc < prev    next >
Text File  |  1978-11-24  |  6KB  |  128 lines

  1. ISL.doc - Copyright (c) 1992 John T. Grieggs, last modified 02-10-93
  2.  
  3. ISL, the Imagine Staging Language, is a language created to make the
  4. generation and manipulation of Imagine 2.0 staging files a whole lot
  5. easier.  If you have ever used the Action editor in earnest, you know
  6. that certain types of operations are easy (such as adding a single
  7. light) while others are not (such as adding more frames and causing
  8. your existing objects to appear in them).
  9.  
  10. ISL provides an alternative interface to the Action editor.  With ISL,
  11. you can create your stage using the Stage and Action editors as needed,
  12. then convert it to a fairly straightforward ASCII format, edit it as
  13. desired using your favorite text editor, then put it back!  This is of
  14. course the simplest way of using ISL - you could also create stages
  15. programatically.  I have done this myself.
  16.  
  17. To use ISL productively, it is first necessary to understand a bit about
  18. how Imagine works.  Quite a bit.  I would not attempt to use this package
  19. if you are not comfortable with Imagine.  If you are struggling, I would
  20. recommend that you purchase Steve Worley's excellent book on the topic,
  21. "Understanding Imagine 2.0", read it, then come back (plug).
  22.  
  23. Back?  Good.  When you first create a Project in Imagine 2.0, Imagine
  24. creates a staging file in your whatever.imp directory.  This staging
  25. file, run through the ISL de-compiler destage, looks like this:
  26.  
  27.     STAGE
  28.     MAXFRAMES 1
  29.  
  30. The command to generate this file or one like it is:
  31.  
  32.     destage binarystage asciistage
  33.  
  34. where binarystage is the Imagine staging file and asciistage is where you
  35. want to put the ISL.
  36.  
  37. The ISL compiler will indeed eat this simple stage format.  Let's say you
  38. just want to add some frames.  You would then have something like this:
  39.  
  40.     STAGE
  41.     MAXFRAMES 100
  42.  
  43. The command to make this into a valid Imagine stage is:
  44.  
  45.     restage asciistage binarystage
  46.  
  47. where asciistage is your modified ISL source file and binarystage is where
  48. you want to put the new Imagine stage.  A word of caution:  it never hurts
  49. to make a backup copy of a staging file before stomping it!
  50.  
  51. That was too easy.  Onto ISL complexity level two.  :-)  If you bring up the
  52. Action editor and save the stage, without touching it, it will magically
  53. grow into something like this:
  54.  
  55.     STAGE
  56.     MAXFRAMES 1
  57.  
  58.     CAMERA "CAMERA"
  59.     POSITION FRAMES 1 1 XYZ 160.000000 -320.000000 160.000000
  60.     ALIGN FRAMES 1 1 XYZ 0.000000 0.000000 0.000000
  61.     SIZE FRAMES 1 1 XYZ 320.000000 640.000000 233.333328
  62.  
  63.     GLOBALS "GLOBALS"
  64.     ACTOR FRAMES 1 1 BRUSH "" 0 BACKDROP "" 0 AMBIENT RGB 0.000000 0.000000
  65.     0.000000 HORIZON RGB 0.000000 0.000000 0.000000 +ZENITH RGB 0.000000
  66.     0.000000 0.000000 -ZENITH RGB 0.000000 0.000000 0.000000 FOG BTL
  67.     0.000000 0.000000 0.000000 FOG RGB 0.000000 0.000000 0.000000
  68.     STARFIELD 0.000000 TRANSITION 0 SKYBLEND 0
  69.  
  70. Note the addition of a CAMERA clause and a GLOBALS clause.  Some detail is
  71. called for at this point.  ISL sentences generally correspond one-for-one
  72. to Action editor entries.  There will be one line containing the name from
  73. the far left-hand column of the Action editor entry (CAMERA "CAMERA" or
  74. GLOBALS "GLOBALS", etc.) followed by one line for each line or line segment
  75. in the Action editor.
  76.  
  77. So, for this simple stage, we have three clumps - the stagehdr, containing
  78. the STAGE and MAXFRAMES clause, the CAMERA clump, containing the name clause,
  79. a position clause, an alignment clause, and a size clause, and the globals
  80. clump, containg the name and the actor info.
  81.  
  82. Here is an ISL object entry, showing what happens when you swap three
  83. physical objects while changing their position and alignment:
  84.  
  85. OBJECT "PORTAL"
  86. ACTOR FRAMES 1 40 NAME "Portal.imp/objects/Portal" CYCLE 0.000000 0.000000 TRANSITION 0
  87. ACTOR FRAMES 41 60 NAME "Portal.imp/objects/Prtal" CYCLE 0.000000 0.000000 TRANSITION 0
  88. ACTOR FRAMES 61 100 NAME "Portal.imp/objects/Prtl" CYCLE 0.000000 0.000000 TRANSITION 0
  89. POSITION FRAMES 1 40 PATH "PATH" ACCEL 0 0.000000 DECEL 0 0.000000
  90. POSITION FRAMES 41 100 XYZ 0.000000 -1000.000000 0.000000
  91. ALIGN FRAMES 1 1 XYZ 0.000000 0.000000 0.000000
  92. ALIGN FRAMES 2 20 XYZ 0.000000 180.000000 0.000000
  93. ALIGN FRAMES 21 39 XYZ 0.000000 360.000000 0.000000
  94. SIZE FRAMES 1 1 XYZ 32.000000 32.000000 32.000000
  95.  
  96. Again, we start with the object name, then follow it with one ISL line for
  97. each Action editor line or line segment.  Note that there are two types of
  98. POSITION line here - the first follows a path "PATH", and the second is
  99. a tween position.  This example is from my flying Portal logo anim.
  100.  
  101. Here is another ISL object entry, showing an object with a SPFX clause:
  102.  
  103. OBJECT "EMERALD"
  104. ACTOR FRAMES 1 12 NAME "Emerald.imp/objects/emerald2.obj" CYCLE 0.000000 0.000000 TRANSITION 0
  105. POSITION FRAMES 1 1 XYZ 0.000000 0.000000 0.000000
  106. ALIGN FRAMES 1 1 XYZ 0.000000 0.000000 3.750000
  107. SIZE FRAMES 1 1 XYZ 5.000000 5.000000 6.500000
  108. EFFECT 1 FRAMES 1 12 Rotate2.0 "Effects/Rotate2.0" ZAXIS DEGREES 45.000000
  109.  
  110. Each Special Effect has it's own syntax.  Use EFFECT 1 for SF/X 1, EFFECT 2
  111. for SF/X 2.  The individual syntax for each effect is documented in ISL.BNF.
  112. Note that an effect is actually recognized by the fifth word, which in this
  113. case is Rotate2.0 - this following clause is the filename in quotes, so that
  114. your effects can live anywhere.
  115.  
  116. I think this ought to be enough to get started using ISL.  The actual syntax
  117. of the language is documented in the included ISL.BNF file.  The easiest way
  118. to get started would probably be to try destage-ing, modifying, and restage-
  119. ing your own files.  I'd stay out of ISL.BNF until you are pretty familiar
  120. with ISL or are stuck.
  121.  
  122. Hey, wait a minute, what about frames.c?  Oh, yeah.  It's a little stage
  123. generator I whipped up.  It's written in c, and produces a bunch of frames
  124. ready to be averaged together (for motion blur, of course).  Take it not as
  125. an example of sheer programming elegance, but rather as an idea of how to
  126. programmatically generate an ISL stage.
  127.  
  128.